package com.message.tcp.ip.ui.transaction.dialog;

import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JTabbedPane;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JPanel;

public class TransactionRegisterDialog extends JDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JTabbedPane tabbedPane;
	private RequestPane requestPane;
	private JPanel responsePane;
	/**
	 * Launch the application.
	 *
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TransactionRegistorDialog dialog = new TransactionRegistorDialog();
					dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
					dialog.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}
	*/
	/**
	 * Create the dialog.
	 */
	public TransactionRegisterDialog() {
		setTitle("Transaction Setup");
		setBounds(100, 100, 714, 518);
		tabbedPane = new JTabbedPane(JTabbedPane.BOTTOM);
		requestPane = new RequestPane();
		responsePane = new JPanel();
		getContentPane().add(tabbedPane, BorderLayout.CENTER);
		tabbedPane.addTab("Request", null, requestPane, null);
		tabbedPane.addTab("Response", null, responsePane, null);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancel");
				cancelButton.setActionCommand("Cancel");
				cancelButton.addActionListener(new ActionListener(){

					@Override
					public void actionPerformed(ActionEvent e) {
						dispose();
					}
					
				});
				buttonPane.add(cancelButton);
			}
		}
	}

}
